package com.qingke.besuper;

import java.io.File;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

public class BeSuperJaxb {
	public static void marshal(BeSuper beSuper){
		try {
			JAXBContext ctx = JAXBContext.newInstance(BeSuper.class);
			ctx.createMarshaller().marshal(beSuper, new File("beSuper.xml"));
		} catch (JAXBException e) {
			e.printStackTrace();
		}
	}
	public static BeSuper unmarshal(){
		BeSuper beSuper =null;
		try {
			JAXBContext ctx = JAXBContext.newInstance(BeSuper.class);
			beSuper = (BeSuper) ctx.createUnmarshaller().unmarshal(new File("beSuper.xml"));
		} catch (JAXBException e) {
			e.printStackTrace();
		}
		return beSuper;
	}
}
